package com.aji.leather1.controller;

import com.aji.allcommon.result.Result;
import com.aji.leather1.service.ClassService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/class")
@Api(tags = "老化类型模块")
@CrossOrigin
@RequiredArgsConstructor
public class ClassController {
    public final ClassService classService;

    @GetMapping("/list")
    @ApiOperation("获取所有老化类型")
    public Result list(){
        return Result.success(classService.list(null));
    }

}
